Skip to main content

sign calculation example

Input values:

  • data = eyJkb2N1bWVudEV4dElEIjoiT1JERVItMTAwMSJ9
  • merchantId = 9662a13f5b4f46dbb1751bbbf86ed402

Step 1: concatenate strings

data + merchantId
eyJkb2N1bWVudEV4dElEIjoiT1JERVItMTAwMSJ99662a13f5b4f46dbb1751bbbf86ed402

Step 2: SHA-1 in lowercase hex

eb22ef5cacd7eebf2f376f6ead31b8dc949e3c82

Step 3: Base64 over UTF-8 bytes of the hex string

ZWIyMmVmNWNhY2Q3ZWViZjJmMzc2ZjZlYWQzMWI4ZGM5NDllM2M4Mg==

Final sign value:

ZWIyMmVmNWNhY2Q3ZWViZjJmMzc2ZjZlYWQzMWI4ZGM5NDllM2M4Mg==